module.exports = (app) => {
  const mongoose = app.mongoose;
  mongoose.pluralize(null); //去除集合后的s
  const Schema = mongoose.Schema;
  const CategorySchema = new Schema(
    {
      // 类目名称
      categoryName: { type: String, required: true },
      //   类目图标
      icon: { type: String, required: true },
    },
    { versionKey: false, timestamps: true }
  );

  return mongoose.model("Category", CategorySchema);
};
